package org.kzwl.book.controller.web;

import cn.hutool.core.util.RandomUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.kzwl.comm.pojo.ResponseData;
import org.kzwl.comm.pojo.bo.CuHeritageBO;
import org.kzwl.entity.web.CuData;
import org.kzwl.service.web.CuDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
import java.util.*;

@Api("大数据")
@RestController
@RequestMapping("/cu-data")
public class CuDataController {

    @Autowired
    CuDataService cuDataService;

    @ApiOperation(value = "获取访问量")
    @GetMapping("/visit")
    public ResponseData<Map<String, Integer>> saveOne() {
        Map<String, Integer> map = new HashMap<>();
        map.put("total", RandomUtil.randomInt(100,10000));
        map.put("today", RandomUtil.randomInt(100,10000));
        map.put("near", RandomUtil.randomInt(100,10000));
        map.put("mouth", RandomUtil.randomInt(100,10000));
        return new ResponseData<>(map);
    }
}
